home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48hor1 / vclock.doc < prev    next >
Text File  |  1995-03-31  |  2KB  |  33 lines

  1. (Comp.sys.handhelds) 
  2. Item: 2836 by stevev at greylady.uoregon.edu 
  3. Author: [Steve VanDevender] 
  4.   Subj: HP-48 visual clock program 
  5.   Date: Fri Apr 19 1991 
  6.  
  7. This is a little something I've been hacking on for the last week 
  8. or so.  I call it "SXwatch".  It displays the current time in a 
  9. somewhat antiquated style which our modern digital watch-wearing 
  10. civilization doesn't use so much any more.  It has the convenient 
  11. feature of staying idle most of the time by using a repeating 
  12. alarm to update the watch hands and laying around in 0 WAIT the 
  13. rest of the time.  Start the display by evaluating SXWATCH and 
  14. stop by pressing any non-shift key. 
  15.  
  16. I discovered an interesting behavior of control alarms while 
  17. writing this program.  It appears that a control alarm aborts 
  18. execution of the currently running program when it goes off, 
  19. instead of acting as an interrupt.  Incidentally, I also 
  20. discovered that a repeating alarm returns its alarm index for 
  21. AFTER it has been rescheduled, which I thought was convenient. 
  22.  
  23. WARNING: Although I took as much care as possible to make this 
  24. program well-behaved, it is possible that it may accidentally 
  25. purge an alarm other than its own if you press ON at the wrong 
  26. time.  Pressing ON while the alarm action is running may cause 
  27. the program to abort and not clean up after itself (it saves the 
  28. contents of the PICT and flags on entry, and restores them on 
  29. exit after killing the repeating alarm).  Pressing any key other 
  30. than ON to halt the program should be safe, although I suspect 
  31. that if the alarm action is running it may not acknowledge such 
  32. keypresses. 
  33.